using System;
using System.ComponentModel.DataAnnotations;

namespace JGSY.CMS.LowCode.Platform.Application.DTOs
{
    /// <summary>
    /// 双因子认证数据传输对象
    /// 用于传输双因子认证设置和状态信息
    /// </summary>
    public class TwoFactorDto
    {
        /// <summary>
        /// 双因子认证记录标识符
        /// </summary>
        public long Id { get; set; }
        
        /// <summary>
        /// 用户标识符
        /// 关联的用户ID
        /// </summary>
        public string UserId { get; set; } = string.Empty;
        
        /// <summary>
        /// 密钥
        /// 用于生成TOTP验证码的密钥
        /// </summary>
        public string SecretKey { get; set; } = string.Empty;
        
        /// <summary>
        /// 备份验证码
        /// 用于紧急情况下的一次性验证码，JSON格式存储
        /// </summary>
        public string? BackupCodes { get; set; }
        
        /// <summary>
        /// 创建时间
        /// 双因子认证设置的创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }
        
        /// <summary>
        /// 最后验证时间
        /// 上次成功验证的时间戳
        /// </summary>
        public DateTime? LastVerifiedAt { get; set; }
        
        /// <summary>
        /// 是否启用
        /// 双因子认证功能的启用状态
        /// </summary>
        public bool IsEnabled { get; set; }
        
        /// <summary>
        /// 备注信息
        /// 额外的备注或说明信息
        /// </summary>
        public string? Remark { get; set; }
    }
}
